package com.ny.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "jwt")
public class JwtConfig {
    
    private String secret = "iot_system_secret_key"; // 默认值
    
    private Long expiration = 86400000L; // 默认值
    
    public String getSecret() {
        System.out.println("获取JWT密钥: " + secret);
        return secret;
    }
    
    public void setSecret(String secret) {
        System.out.println("设置JWT密钥: " + secret);
        this.secret = secret;
    }
    
    public Long getExpiration() {
        System.out.println("获取JWT过期时间: " + expiration);
        return expiration;
    }
    
    public void setExpiration(Long expiration) {
        System.out.println("设置JWT过期时间: " + expiration);
        this.expiration = expiration;
    }
}